﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using sdm.exam.domain;
using sdm.exam.domain.Manager;
using sdm.exam.domain.Entities;

namespace sdm.exam.ui.ClassAdministration.TeamRegistraion
{
    /// <summary>
    /// Interaction logic for addTeamRegistration.xaml
    /// </summary>
    public partial class addTeamRegistration : UserControl
    {
        public addTeamRegistration()
        {
            InitializeComponent();
            populateCheckbox();
        }

        private void populateCheckbox()
        {
            var eduMan =  new EducationManager();
            List<Education> list = eduMan.GetListOfEducations();
            var idNameList = list.ToDictionary(item => item.Id, item => item.Name);
            comboBoxCourse.DataContext = idNameList.Values;
        }

        private void btnSubmit_Click(object sender, RoutedEventArgs e)
        {
            comboBoxCourse.Text = 
            if (datePickerEnd.SelectedDate != null && datePickerStart.SelectedDate != null)
                SemesterClassManager.AddNewSemesterClass(txtName.Text, datePickerStart.SelectedDate.Value, datePickerEnd.SelectedDate.Value, comboBoxCourse.Text);
        }
    }
}
